<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>板块</title>
    <link rel="stylesheet" href="../res/css/global.css" />
    <link rel="stylesheet" href="../res/layui/css/layui.css" />
    <style>
        ul.pagination {
            display: inline-block;
            padding: 0;
            margin: 0;
        }

        ul.pagination li {
            display: inline;
        }

        ul.pagination li a {
            color: black;
            float: left;
            padding: 8px 16px;
            text-decoration: none;
        }

        ul.pagination li a.active {
            background-color: #4CAF50;
            color: white;
        }

        ul.pagination li a:hover:not(.active) {
            background-color: #ddd;
        }
    </style>
</head>
<div class="fly-header layui-bg-black">
<div class="layui-container">

<ul class="layui-nav fly-nav layui-hide-xs">
    <#list category as category>
        <li class="layui-nav-item layui-this" style="border-right: 1px solid black;border-left:  1px solid black;width: 80px;">
            <a href="/getTopic?name=${category.name}">${category.name}</a>
        </li>
    </#list>


    <li class="layui-nav-item" style="position: absolute;right: 210px;">
        <a class="iconfont icon-touxiang layui-hide-xs" href="/userinfo">欢迎，${nickname!"游客"}</a>
    </li>

    <span class="layui-nav-bar" style="left: 0px; top: 55px; width: 0px; opacity: 0;"></span></ul>

</div>
</div>

<div class="layui-container">
    <div style="width: 1000px;">
        <br /><div  style="float: left;"></div><h3 style="float: left;line-height: 30px;">&nbsp;&nbsp;>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/mine" class="layui-btn">发帖</a></h3>
        <hr class="layui-bg-black" />

        <#list page.getList() as topic>
            <a href="/detial?topicid=${topic.id}">
                <div style="height: 200px;top: 20px;position: relative;">

                    <div style="height: 200px;width: 800px;float: left;left: 70px;position: relative;" >
                        <h1>${topic.name}</h1><h2>${topic.categoryname}</h2>
                        <br />
                        <p style="height: 100px;overflow: hidden">${topic.content}</p>
                    </div>

                </div>
            </a>

            <hr class="layui-bg-black" />
        </#list>




    </div>
    <div >
        <ul class="pagination" >
            <#if page.getPageNumber() !=1>
            <li>
                <a href="/getpage?pagenum=${page.getPageNumber()-1}">«</a>
            </li>
            </#if>
            <li>
                <a class="active" href="#">当前第${page.getPageNumber()}页</a>
            </li>

            <#if page.getPageNumber() <page.getTotalPage()>
                <li>
                    <a href="/getpage?pagenum=${page.getPageNumber()+1}">»</a>
                </li>
            </#if>
            <li>
                <a  href="#">共${ page.getTotalPage()}页</a>
            </li>

        </ul>
    </div>

</div>
<div class="fly-footer">
    <p>
        <a href="#" target="_blank">JfinalBlog</a> 2018 ©

    </p>

</div>
</body>
</html>
 